package com.hitqz.robot.biz.service.impl;

import cn.hutool.core.util.StrUtil;
import com.hitqz.robot.biz.service.AreaActionStrategy;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author xupkun
 * @date 2024/9/4
 */
@Service("closBarrierGate")
@RequiredArgsConstructor
@Slf4j
public class CloseBarrierGateServiceImpl implements AreaActionStrategy {
    @Override
    public int doActionAnyWhere(double distance, String params) {
        return 0;
    }

    @Override
    public int doActionInArea(double distance, String params) {
        return 0;
    }

    @Override
    public int doActionEnterArea(double distance, String params) {
        if (StrUtil.isNotBlank(params)){
            return 0;
        }
        double parseDouble = Double.parseDouble(params);
        if (distance <= parseDouble) {
            
            //读取是否已经打开




        }




        return 0;
    }

    @Override
    public int doActionLeaveArea(double distance, String params) {
        return 0;
    }
}
